import request from '@/config/axios'

// 标签 VO
export interface ArticleSignVO {
  id: number // 主键
  name: string // 标签名
  alias: string // 标签别名
  description: string // 描述
}

// 标签 API
export const ArticleSignApi = {
  // 查询标签分页
  getArticleSignPage: async (params: any) => {
    return await request.get({ url: `/system/article-sign/page`, params })
  },
  // 查询标签分页
  getArticleSignList: async () => {
    return await request.get({ url: `/system/article-sign/list` })
  },

  // 查询标签详情
  getArticleSign: async (id: number) => {
    return await request.get({ url: `/system/article-sign/get?id=` + id })
  },

  // 新增标签
  createArticleSign: async (data: ArticleSignVO) => {
    return await request.post({ url: `/system/article-sign/create`, data })
  },

  // 修改标签
  updateArticleSign: async (data: ArticleSignVO) => {
    return await request.put({ url: `/system/article-sign/update`, data })
  },

  // 删除标签
  deleteArticleSign: async (id: number) => {
    return await request.delete({ url: `/system/article-sign/delete?id=` + id })
  },

  // 导出标签 Excel
  exportArticleSign: async (params) => {
    return await request.download({ url: `/system/article-sign/export-excel`, params })
  }
}
